package cn.hznc.domain.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author：Administrator
 * @Date：2023/5/6 10:10
 */
@Table(name = "t_entry_exit_record")
@TableName(value = "t_entry_exit_record")
@Getter
@Setter
public class EntryExitRecordEntity{

    /**
     * 系统编码
     */
    @Column(name = "id",type = MySqlTypeConstant.INT,length = 11 , isKey = true ,isAutoIncrement = true)
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 订单号
     */
    @Column(name = "order_number",type = MySqlTypeConstant.VARCHAR,length = 100)
    @TableField("order_number")
    private String orderNumber;

    /**
     * 操作数量
     */
    @Column(name = "number",type = MySqlTypeConstant.INT , length = 11)
    @TableField("number")
    private Integer number;

    /**
     * 批次
     */
    @Column(name = "batch",type = MySqlTypeConstant.VARCHAR, length = 255)
    @TableField("batch")
    private String batch;

    /**
     * 材料文件
     */
    @Column(name = "material_document",type = MySqlTypeConstant.VARCHAR, length = 100)
    @TableField("material_document")
    private String materialDocument;

    /**
     * 创建时间
     */
    @Column(name = "create_time", type = MySqlTypeConstant.DATETIME, length = 0)
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date createTime;

    /**
     * 工件库存关系表主键id
     */
    @Column(name = "tool_inventory_location_id",type = MySqlTypeConstant.INT ,  length = 11)
    @TableField("tool_inventory_location_id")
    private Integer toolInventoryLocationId;

    /**
     * 操作员
     */
    @Column(name = "operator",type = MySqlTypeConstant.VARCHAR ,  length = 100)
    @TableField("operator")
    private String operator;

    /**
     * 出入库类型
     */
    @Column(name = "type",type = MySqlTypeConstant.VARCHAR ,  length = 50)
    @TableField("type")
    private String type;

    /**
     * 单价
     */
    @Column(name = "price",type = MySqlTypeConstant.DECIMAL ,  length = 14)
    @TableField("price")
    private BigDecimal price;

    /**
     * 其它参数
     */
    @Column(name = "params",type = MySqlTypeConstant.TEXT)
    @TableField("params")
    private String params;

    /**
     * 单位
     */
    @Column(name = "unit",type = MySqlTypeConstant.VARCHAR , length = 30)
    @TableField("unit")
    private String unit;

    /**
     * 备注
     */
    @Column(name = "bz",type = MySqlTypeConstant.VARCHAR , length = 300)
    @TableField("bz")
    private String bz;

    @Column(name = "warehouse_name",type = MySqlTypeConstant.VARCHAR , length = 200)
    @TableField("warehouse_name")
    private String warehouseName;

    @Column(name = "warehouse_type",type = MySqlTypeConstant.VARCHAR , length = 100)
    @TableField("warehouse_type")
    private String warehouseType;

    @Column(name = "warehouse_id",type = MySqlTypeConstant.INT , length = 11)
    @TableField("warehouse_id")
    private Integer warehouseId;

    @Column(name = "taskId",type = MySqlTypeConstant.VARCHAR , length = 200)
    @TableField("taskId")
    private String taskId;

    @Column(name = "production_num",type = MySqlTypeConstant.VARCHAR , length = 200)
    @TableField("production_num")
    private String productionNum;

    @Column(name = "partno",type = MySqlTypeConstant.VARCHAR , length = 200)
    @TableField("partno")
    private String partno;

    @Column(name = "tool_no",type = MySqlTypeConstant.VARCHAR , length = 200)
    @TableField("tool_no")
    private String toolNo;

    @Column(name = "tool_type_code",type = MySqlTypeConstant.VARCHAR , length = 200)
    @TableField("tool_type_code")
    private String toolTypeCode;

    @TableField(exist = false)
    private String idnr;

    @TableField(exist = false)
    private String typeName;

    @Column(name = "tool_params",type = MySqlTypeConstant.VARCHAR , length = 200)
    @TableField("tool_params")
    private String toolParams;

}
